import api from '../api'
import settings from '~/conf/settings'

const state = {
}


const getters = {

}

const actions = {

  positionList({commit, dispatch}, params) {
    return api.get(api.url('positionList'), params)
  },

  createPosition({commit, dispatch}, params) {
    return api.post(api.url('createPosition'), params)
  },

  positionDetail({commit, dispatch}, params) {
    return api.get(api.url('positionDetail', params.id))
  },

  positionEdit({commit, dispatch}, params) {
    return api.put(api.url('positionEdit', params.id), params)
  },

  positionDelete({commit, dispatch}, params) {
    return api.delete(api.url('positionDelete', params.id))
  }

}

const mutations = {

}

export default {
  state,
  getters,
  actions,
  mutations
}
